/*
Copyright SecureKey Technologies Inc. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0
*/

package filter

import (
	"git.cloud.inspur.com/ichain/ichain-sdk-go/pkg/providers/ichain"
)

type iamFilter struct {
	iamID string
}

func (f iamFilter) Accept(inode ichain.Inode) bool {
	return f.iamID == inode.IAMID()
}

func NewIAMFilter(iamID string) ichain.TargetFilter {
	return &iamFilter{iamID: iamID}
}
